<?php
	/**
	 * This is a MetaControl class, providing a QForm or QPanel access to event handlers
	 * and QControls to perform the Create, Edit, and Delete functionality
	 * of the MantisBugnoteTable class.  This code-generated class
	 * contains all the basic elements to help a QPanel or QForm display an HTML form that can
	 * manipulate a single MantisBugnoteTable object.
	 *
	 * To take advantage of some (or all) of these control objects, you
	 * must create a new QForm or QPanel which instantiates a MantisBugnoteTableMetaControl
	 * class.
	 *
	 * Any and all changes to this file will be overwritten with any subsequent
	 * code re-generation.
	 *
	 * @package My QCubed Application
	 * @subpackage MetaControls
	 * @property-read MantisBugnoteTable $MantisBugnoteTable the actual MantisBugnoteTable data class being edited
	 * @property QLabel $IdControl
	 * @property-read QLabel $IdLabel
	 * @property QIntegerTextBox $BugIdControl
	 * @property-read QLabel $BugIdLabel
	 * @property QIntegerTextBox $ReporterIdControl
	 * @property-read QLabel $ReporterIdLabel
	 * @property QIntegerTextBox $BugnoteTextIdControl
	 * @property-read QLabel $BugnoteTextIdLabel
	 * @property QIntegerTextBox $ViewStateControl
	 * @property-read QLabel $ViewStateLabel
	 * @property QIntegerTextBox $NoteTypeControl
	 * @property-read QLabel $NoteTypeLabel
	 * @property QTextBox $NoteAttrControl
	 * @property-read QLabel $NoteAttrLabel
	 * @property QIntegerTextBox $TimeTrackingControl
	 * @property-read QLabel $TimeTrackingLabel
	 * @property QIntegerTextBox $LastModifiedControl
	 * @property-read QLabel $LastModifiedLabel
	 * @property QIntegerTextBox $DateSubmittedControl
	 * @property-read QLabel $DateSubmittedLabel
	 * @property-read string $TitleVerb a verb indicating whether or not this is being edited or created
	 * @property-read boolean $EditMode a boolean indicating whether or not this is being edited or created
	 */

	class MantisBugnoteTableMetaControlGen extends QBaseClass {
		// General Variables
		/**
		 * @var MantisBugnoteTable objMantisBugnoteTable
		 * @access protected
		 */
		protected $objMantisBugnoteTable;
		/**
		 * @var QForm|QControl objParentObject
		 * @access protected
		 */
		protected $objParentObject;
		/**
		 * @var string strTitleVerb
		 * @access protected
		 */
		protected $strTitleVerb;
		/**
		 * @var boolean blnEditMode
		 * @access protected
		 */
		protected $blnEditMode;

		// Controls that allow the editing of MantisBugnoteTable's individual data fields
		/**
		 * @var QLabel lblId
		 * @access protected
		 */
		protected $lblId;
		/**
		 * @var QIntegerTextBox txtBugId
		 * @access protected
		 */
		protected $txtBugId;
		/**
		 * @var QIntegerTextBox txtReporterId
		 * @access protected
		 */
		protected $txtReporterId;
		/**
		 * @var QIntegerTextBox txtBugnoteTextId
		 * @access protected
		 */
		protected $txtBugnoteTextId;
		/**
		 * @var QIntegerTextBox txtViewState
		 * @access protected
		 */
		protected $txtViewState;
		/**
		 * @var QIntegerTextBox txtNoteType
		 * @access protected
		 */
		protected $txtNoteType;
		/**
		 * @var QTextBox txtNoteAttr
		 * @access protected
		 */
		protected $txtNoteAttr;
		/**
		 * @var QIntegerTextBox txtTimeTracking
		 * @access protected
		 */
		protected $txtTimeTracking;
		/**
		 * @var QIntegerTextBox txtLastModified
		 * @access protected
		 */
		protected $txtLastModified;
		/**
		 * @var QIntegerTextBox txtDateSubmitted
		 * @access protected
		 */
		protected $txtDateSubmitted;

		// Controls that allow the viewing of MantisBugnoteTable's individual data fields
		/**
		 * @var QLabel lblBugId
		 * @access protected
		 */
		protected $lblBugId;
		/**
		 * @var QLabel lblReporterId
		 * @access protected
		 */
		protected $lblReporterId;
		/**
		 * @var QLabel lblBugnoteTextId
		 * @access protected
		 */
		protected $lblBugnoteTextId;
		/**
		 * @var QLabel lblViewState
		 * @access protected
		 */
		protected $lblViewState;
		/**
		 * @var QLabel lblNoteType
		 * @access protected
		 */
		protected $lblNoteType;
		/**
		 * @var QLabel lblNoteAttr
		 * @access protected
		 */
		protected $lblNoteAttr;
		/**
		 * @var QLabel lblTimeTracking
		 * @access protected
		 */
		protected $lblTimeTracking;
		/**
		 * @var QLabel lblLastModified
		 * @access protected
		 */
		protected $lblLastModified;
		/**
		 * @var QLabel lblDateSubmitted
		 * @access protected
		 */
		protected $lblDateSubmitted;

		// QListBox Controls (if applicable) to edit Unique ReverseReferences and ManyToMany References

		// QLabel Controls (if applicable) to view Unique ReverseReferences and ManyToMany References


		/**
		 * Main constructor.  Constructor OR static create methods are designed to be called in either
		 * a parent QPanel or the main QForm when wanting to create a
		 * MantisBugnoteTableMetaControl to edit a single MantisBugnoteTable object within the
		 * QPanel or QForm.
		 *
		 * This constructor takes in a single MantisBugnoteTable object, while any of the static
		 * create methods below can be used to construct based off of individual PK ID(s).
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this MantisBugnoteTableMetaControl
		 * @param MantisBugnoteTable $objMantisBugnoteTable new or existing MantisBugnoteTable object
		 */
		 public function __construct($objParentObject, MantisBugnoteTable $objMantisBugnoteTable) {
			// Setup Parent Object (e.g. QForm or QPanel which will be using this MantisBugnoteTableMetaControl)
			$this->objParentObject = $objParentObject;

			// Setup linked MantisBugnoteTable object
			$this->objMantisBugnoteTable = $objMantisBugnoteTable;

			// Figure out if we're Editing or Creating New
			if ($this->objMantisBugnoteTable->__Restored) {
				$this->strTitleVerb = QApplication::Translate('Edit');
				$this->blnEditMode = true;
			} else {
				$this->strTitleVerb = QApplication::Translate('Create');
				$this->blnEditMode = false;
			}
		 }

		/**
		 * Static Helper Method to Create using PK arguments
		 * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
		 * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
		 * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to
		 * edit, or if we are also allowed to create a new one, etc.
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this MantisBugnoteTableMetaControl
		 * @param integer $intId primary key value
		 * @param QMetaControlCreateType $intCreateType rules governing MantisBugnoteTable object creation - defaults to CreateOrEdit
 		 * @return MantisBugnoteTableMetaControl
		 */
		public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			// Attempt to Load from PK Arguments
			if (strlen($intId)) {
				$objMantisBugnoteTable = MantisBugnoteTable::Load($intId);

				// MantisBugnoteTable was found -- return it!
				if ($objMantisBugnoteTable)
					return new MantisBugnoteTableMetaControl($objParentObject, $objMantisBugnoteTable);

				// If CreateOnRecordNotFound not specified, throw an exception
				else if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)
					throw new QCallerException('Could not find a MantisBugnoteTable object with PK arguments: ' . $intId);

			// If EditOnly is specified, throw an exception
			} else if ($intCreateType == QMetaControlCreateType::EditOnly)
				throw new QCallerException('No PK arguments specified');

			// If we are here, then we need to create a new record
			return new MantisBugnoteTableMetaControl($objParentObject, new MantisBugnoteTable());
		}

		/**
		 * Static Helper Method to Create using PathInfo arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this MantisBugnoteTableMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing MantisBugnoteTable object creation - defaults to CreateOrEdit
		 * @return MantisBugnoteTableMetaControl
		 */
		public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::PathInfo(0);
			return MantisBugnoteTableMetaControl::Create($objParentObject, $intId, $intCreateType);
		}

		/**
		 * Static Helper Method to Create using QueryString arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this MantisBugnoteTableMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing MantisBugnoteTable object creation - defaults to CreateOrEdit
		 * @return MantisBugnoteTableMetaControl
		 */
		public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::QueryString('intId');
			return MantisBugnoteTableMetaControl::Create($objParentObject, $intId, $intCreateType);
		}



		///////////////////////////////////////////////
		// PUBLIC CREATE and REFRESH METHODS
		///////////////////////////////////////////////

		/**
		 * Create and setup QLabel lblId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblId_Create($strControlId = null) {
			$this->lblId = new QLabel($this->objParentObject, $strControlId);
			$this->lblId->Name = QApplication::Translate('Id');
			if ($this->blnEditMode)
				$this->lblId->Text = $this->objMantisBugnoteTable->Id;
			else
				$this->lblId->Text = 'N/A';
			return $this->lblId;
		}

		/**
		 * Create and setup QIntegerTextBox txtBugId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtBugId_Create($strControlId = null) {
			$this->txtBugId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtBugId->Name = QApplication::Translate('Bug Id');
			$this->txtBugId->Text = $this->objMantisBugnoteTable->BugId;
			$this->txtBugId->Required = true;
			return $this->txtBugId;
		}

		/**
		 * Create and setup QLabel lblBugId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblBugId_Create($strControlId = null, $strFormat = null) {
			$this->lblBugId = new QLabel($this->objParentObject, $strControlId);
			$this->lblBugId->Name = QApplication::Translate('Bug Id');
			$this->lblBugId->Text = $this->objMantisBugnoteTable->BugId;
			$this->lblBugId->Required = true;
			$this->lblBugId->Format = $strFormat;
			return $this->lblBugId;
		}

		/**
		 * Create and setup QIntegerTextBox txtReporterId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtReporterId_Create($strControlId = null) {
			$this->txtReporterId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtReporterId->Name = QApplication::Translate('Reporter Id');
			$this->txtReporterId->Text = $this->objMantisBugnoteTable->ReporterId;
			$this->txtReporterId->Required = true;
			return $this->txtReporterId;
		}

		/**
		 * Create and setup QLabel lblReporterId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblReporterId_Create($strControlId = null, $strFormat = null) {
			$this->lblReporterId = new QLabel($this->objParentObject, $strControlId);
			$this->lblReporterId->Name = QApplication::Translate('Reporter Id');
			$this->lblReporterId->Text = $this->objMantisBugnoteTable->ReporterId;
			$this->lblReporterId->Required = true;
			$this->lblReporterId->Format = $strFormat;
			return $this->lblReporterId;
		}

		/**
		 * Create and setup QIntegerTextBox txtBugnoteTextId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtBugnoteTextId_Create($strControlId = null) {
			$this->txtBugnoteTextId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtBugnoteTextId->Name = QApplication::Translate('Bugnote Text Id');
			$this->txtBugnoteTextId->Text = $this->objMantisBugnoteTable->BugnoteTextId;
			$this->txtBugnoteTextId->Required = true;
			return $this->txtBugnoteTextId;
		}

		/**
		 * Create and setup QLabel lblBugnoteTextId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblBugnoteTextId_Create($strControlId = null, $strFormat = null) {
			$this->lblBugnoteTextId = new QLabel($this->objParentObject, $strControlId);
			$this->lblBugnoteTextId->Name = QApplication::Translate('Bugnote Text Id');
			$this->lblBugnoteTextId->Text = $this->objMantisBugnoteTable->BugnoteTextId;
			$this->lblBugnoteTextId->Required = true;
			$this->lblBugnoteTextId->Format = $strFormat;
			return $this->lblBugnoteTextId;
		}

		/**
		 * Create and setup QIntegerTextBox txtViewState
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtViewState_Create($strControlId = null) {
			$this->txtViewState = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtViewState->Name = QApplication::Translate('View State');
			$this->txtViewState->Text = $this->objMantisBugnoteTable->ViewState;
			$this->txtViewState->Required = true;
			return $this->txtViewState;
		}

		/**
		 * Create and setup QLabel lblViewState
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblViewState_Create($strControlId = null, $strFormat = null) {
			$this->lblViewState = new QLabel($this->objParentObject, $strControlId);
			$this->lblViewState->Name = QApplication::Translate('View State');
			$this->lblViewState->Text = $this->objMantisBugnoteTable->ViewState;
			$this->lblViewState->Required = true;
			$this->lblViewState->Format = $strFormat;
			return $this->lblViewState;
		}

		/**
		 * Create and setup QIntegerTextBox txtNoteType
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtNoteType_Create($strControlId = null) {
			$this->txtNoteType = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtNoteType->Name = QApplication::Translate('Note Type');
			$this->txtNoteType->Text = $this->objMantisBugnoteTable->NoteType;
			return $this->txtNoteType;
		}

		/**
		 * Create and setup QLabel lblNoteType
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblNoteType_Create($strControlId = null, $strFormat = null) {
			$this->lblNoteType = new QLabel($this->objParentObject, $strControlId);
			$this->lblNoteType->Name = QApplication::Translate('Note Type');
			$this->lblNoteType->Text = $this->objMantisBugnoteTable->NoteType;
			$this->lblNoteType->Format = $strFormat;
			return $this->lblNoteType;
		}

		/**
		 * Create and setup QTextBox txtNoteAttr
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtNoteAttr_Create($strControlId = null) {
			$this->txtNoteAttr = new QTextBox($this->objParentObject, $strControlId);
			$this->txtNoteAttr->Name = QApplication::Translate('Note Attr');
			$this->txtNoteAttr->Text = $this->objMantisBugnoteTable->NoteAttr;
			$this->txtNoteAttr->MaxLength = MantisBugnoteTable::NoteAttrMaxLength;
			return $this->txtNoteAttr;
		}

		/**
		 * Create and setup QLabel lblNoteAttr
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblNoteAttr_Create($strControlId = null) {
			$this->lblNoteAttr = new QLabel($this->objParentObject, $strControlId);
			$this->lblNoteAttr->Name = QApplication::Translate('Note Attr');
			$this->lblNoteAttr->Text = $this->objMantisBugnoteTable->NoteAttr;
			return $this->lblNoteAttr;
		}

		/**
		 * Create and setup QIntegerTextBox txtTimeTracking
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtTimeTracking_Create($strControlId = null) {
			$this->txtTimeTracking = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtTimeTracking->Name = QApplication::Translate('Time Tracking');
			$this->txtTimeTracking->Text = $this->objMantisBugnoteTable->TimeTracking;
			$this->txtTimeTracking->Required = true;
			return $this->txtTimeTracking;
		}

		/**
		 * Create and setup QLabel lblTimeTracking
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblTimeTracking_Create($strControlId = null, $strFormat = null) {
			$this->lblTimeTracking = new QLabel($this->objParentObject, $strControlId);
			$this->lblTimeTracking->Name = QApplication::Translate('Time Tracking');
			$this->lblTimeTracking->Text = $this->objMantisBugnoteTable->TimeTracking;
			$this->lblTimeTracking->Required = true;
			$this->lblTimeTracking->Format = $strFormat;
			return $this->lblTimeTracking;
		}

		/**
		 * Create and setup QIntegerTextBox txtLastModified
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtLastModified_Create($strControlId = null) {
			$this->txtLastModified = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtLastModified->Name = QApplication::Translate('Last Modified');
			$this->txtLastModified->Text = $this->objMantisBugnoteTable->LastModified;
			$this->txtLastModified->Required = true;
			return $this->txtLastModified;
		}

		/**
		 * Create and setup QLabel lblLastModified
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblLastModified_Create($strControlId = null, $strFormat = null) {
			$this->lblLastModified = new QLabel($this->objParentObject, $strControlId);
			$this->lblLastModified->Name = QApplication::Translate('Last Modified');
			$this->lblLastModified->Text = $this->objMantisBugnoteTable->LastModified;
			$this->lblLastModified->Required = true;
			$this->lblLastModified->Format = $strFormat;
			return $this->lblLastModified;
		}

		/**
		 * Create and setup QIntegerTextBox txtDateSubmitted
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtDateSubmitted_Create($strControlId = null) {
			$this->txtDateSubmitted = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtDateSubmitted->Name = QApplication::Translate('Date Submitted');
			$this->txtDateSubmitted->Text = $this->objMantisBugnoteTable->DateSubmitted;
			$this->txtDateSubmitted->Required = true;
			return $this->txtDateSubmitted;
		}

		/**
		 * Create and setup QLabel lblDateSubmitted
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblDateSubmitted_Create($strControlId = null, $strFormat = null) {
			$this->lblDateSubmitted = new QLabel($this->objParentObject, $strControlId);
			$this->lblDateSubmitted->Name = QApplication::Translate('Date Submitted');
			$this->lblDateSubmitted->Text = $this->objMantisBugnoteTable->DateSubmitted;
			$this->lblDateSubmitted->Required = true;
			$this->lblDateSubmitted->Format = $strFormat;
			return $this->lblDateSubmitted;
		}



		/**
		 * Refresh this MetaControl with Data from the local MantisBugnoteTable object.
		 * @param boolean $blnReload reload MantisBugnoteTable from the database
		 * @return void
		 */
		public function Refresh($blnReload = false) {
			if ($blnReload)
				$this->objMantisBugnoteTable->Reload();

			if ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objMantisBugnoteTable->Id;

			if ($this->txtBugId) $this->txtBugId->Text = $this->objMantisBugnoteTable->BugId;
			if ($this->lblBugId) $this->lblBugId->Text = $this->objMantisBugnoteTable->BugId;

			if ($this->txtReporterId) $this->txtReporterId->Text = $this->objMantisBugnoteTable->ReporterId;
			if ($this->lblReporterId) $this->lblReporterId->Text = $this->objMantisBugnoteTable->ReporterId;

			if ($this->txtBugnoteTextId) $this->txtBugnoteTextId->Text = $this->objMantisBugnoteTable->BugnoteTextId;
			if ($this->lblBugnoteTextId) $this->lblBugnoteTextId->Text = $this->objMantisBugnoteTable->BugnoteTextId;

			if ($this->txtViewState) $this->txtViewState->Text = $this->objMantisBugnoteTable->ViewState;
			if ($this->lblViewState) $this->lblViewState->Text = $this->objMantisBugnoteTable->ViewState;

			if ($this->txtNoteType) $this->txtNoteType->Text = $this->objMantisBugnoteTable->NoteType;
			if ($this->lblNoteType) $this->lblNoteType->Text = $this->objMantisBugnoteTable->NoteType;

			if ($this->txtNoteAttr) $this->txtNoteAttr->Text = $this->objMantisBugnoteTable->NoteAttr;
			if ($this->lblNoteAttr) $this->lblNoteAttr->Text = $this->objMantisBugnoteTable->NoteAttr;

			if ($this->txtTimeTracking) $this->txtTimeTracking->Text = $this->objMantisBugnoteTable->TimeTracking;
			if ($this->lblTimeTracking) $this->lblTimeTracking->Text = $this->objMantisBugnoteTable->TimeTracking;

			if ($this->txtLastModified) $this->txtLastModified->Text = $this->objMantisBugnoteTable->LastModified;
			if ($this->lblLastModified) $this->lblLastModified->Text = $this->objMantisBugnoteTable->LastModified;

			if ($this->txtDateSubmitted) $this->txtDateSubmitted->Text = $this->objMantisBugnoteTable->DateSubmitted;
			if ($this->lblDateSubmitted) $this->lblDateSubmitted->Text = $this->objMantisBugnoteTable->DateSubmitted;

		}



		///////////////////////////////////////////////
		// PROTECTED UPDATE METHODS for ManyToManyReferences (if any)
		///////////////////////////////////////////////





		///////////////////////////////////////////////
		// PUBLIC MANTISBUGNOTETABLE OBJECT MANIPULATORS
		///////////////////////////////////////////////

		/**
		 * This will save this object's MantisBugnoteTable instance,
		 * updating only the fields which have had a control created for it.
		 */
		public function SaveMantisBugnoteTable() {
			try {
				// Update any fields for controls that have been created
				if ($this->txtBugId) $this->objMantisBugnoteTable->BugId = $this->txtBugId->Text;
				if ($this->txtReporterId) $this->objMantisBugnoteTable->ReporterId = $this->txtReporterId->Text;
				if ($this->txtBugnoteTextId) $this->objMantisBugnoteTable->BugnoteTextId = $this->txtBugnoteTextId->Text;
				if ($this->txtViewState) $this->objMantisBugnoteTable->ViewState = $this->txtViewState->Text;
				if ($this->txtNoteType) $this->objMantisBugnoteTable->NoteType = $this->txtNoteType->Text;
				if ($this->txtNoteAttr) $this->objMantisBugnoteTable->NoteAttr = $this->txtNoteAttr->Text;
				if ($this->txtTimeTracking) $this->objMantisBugnoteTable->TimeTracking = $this->txtTimeTracking->Text;
				if ($this->txtLastModified) $this->objMantisBugnoteTable->LastModified = $this->txtLastModified->Text;
				if ($this->txtDateSubmitted) $this->objMantisBugnoteTable->DateSubmitted = $this->txtDateSubmitted->Text;

				// Update any UniqueReverseReferences (if any) for controls that have been created for it

				// Save the MantisBugnoteTable object
				$this->objMantisBugnoteTable->Save();

				// Finally, update any ManyToManyReferences (if any)
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * This will DELETE this object's MantisBugnoteTable instance from the database.
		 * It will also unassociate itself from any ManyToManyReferences.
		 */
		public function DeleteMantisBugnoteTable() {
			$this->objMantisBugnoteTable->Delete();
		}



		///////////////////////////////////////////////
		// PUBLIC GETTERS and SETTERS
		///////////////////////////////////////////////

		/**
		 * Override method to perform a property "Get"
		 * This will get the value of $strName
		 *
		 * @param string $strName Name of the property to get
		 * @return mixed
		 */
		public function __get($strName) {
			switch ($strName) {
				// General MetaControlVariables
				case 'MantisBugnoteTable': return $this->objMantisBugnoteTable;
				case 'TitleVerb': return $this->strTitleVerb;
				case 'EditMode': return $this->blnEditMode;

				// Controls that point to MantisBugnoteTable fields -- will be created dynamically if not yet created
				case 'IdControl':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'IdLabel':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'BugIdControl':
					if (!$this->txtBugId) return $this->txtBugId_Create();
					return $this->txtBugId;
				case 'BugIdLabel':
					if (!$this->lblBugId) return $this->lblBugId_Create();
					return $this->lblBugId;
				case 'ReporterIdControl':
					if (!$this->txtReporterId) return $this->txtReporterId_Create();
					return $this->txtReporterId;
				case 'ReporterIdLabel':
					if (!$this->lblReporterId) return $this->lblReporterId_Create();
					return $this->lblReporterId;
				case 'BugnoteTextIdControl':
					if (!$this->txtBugnoteTextId) return $this->txtBugnoteTextId_Create();
					return $this->txtBugnoteTextId;
				case 'BugnoteTextIdLabel':
					if (!$this->lblBugnoteTextId) return $this->lblBugnoteTextId_Create();
					return $this->lblBugnoteTextId;
				case 'ViewStateControl':
					if (!$this->txtViewState) return $this->txtViewState_Create();
					return $this->txtViewState;
				case 'ViewStateLabel':
					if (!$this->lblViewState) return $this->lblViewState_Create();
					return $this->lblViewState;
				case 'NoteTypeControl':
					if (!$this->txtNoteType) return $this->txtNoteType_Create();
					return $this->txtNoteType;
				case 'NoteTypeLabel':
					if (!$this->lblNoteType) return $this->lblNoteType_Create();
					return $this->lblNoteType;
				case 'NoteAttrControl':
					if (!$this->txtNoteAttr) return $this->txtNoteAttr_Create();
					return $this->txtNoteAttr;
				case 'NoteAttrLabel':
					if (!$this->lblNoteAttr) return $this->lblNoteAttr_Create();
					return $this->lblNoteAttr;
				case 'TimeTrackingControl':
					if (!$this->txtTimeTracking) return $this->txtTimeTracking_Create();
					return $this->txtTimeTracking;
				case 'TimeTrackingLabel':
					if (!$this->lblTimeTracking) return $this->lblTimeTracking_Create();
					return $this->lblTimeTracking;
				case 'LastModifiedControl':
					if (!$this->txtLastModified) return $this->txtLastModified_Create();
					return $this->txtLastModified;
				case 'LastModifiedLabel':
					if (!$this->lblLastModified) return $this->lblLastModified_Create();
					return $this->lblLastModified;
				case 'DateSubmittedControl':
					if (!$this->txtDateSubmitted) return $this->txtDateSubmitted_Create();
					return $this->txtDateSubmitted;
				case 'DateSubmittedLabel':
					if (!$this->lblDateSubmitted) return $this->lblDateSubmitted_Create();
					return $this->lblDateSubmitted;
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

		/**
		 * Override method to perform a property "Set"
		 * This will set the property $strName to be $mixValue
		 *
		 * @param string $strName Name of the property to set
		 * @param string $mixValue New value of the property
		 * @return mixed
		 */
		public function __set($strName, $mixValue) {
			try {
				switch ($strName) {
					// Controls that point to MantisBugnoteTable fields
					case 'IdControl':
						return ($this->lblId = QType::Cast($mixValue, 'QControl'));
					case 'BugIdControl':
						return ($this->txtBugId = QType::Cast($mixValue, 'QControl'));
					case 'ReporterIdControl':
						return ($this->txtReporterId = QType::Cast($mixValue, 'QControl'));
					case 'BugnoteTextIdControl':
						return ($this->txtBugnoteTextId = QType::Cast($mixValue, 'QControl'));
					case 'ViewStateControl':
						return ($this->txtViewState = QType::Cast($mixValue, 'QControl'));
					case 'NoteTypeControl':
						return ($this->txtNoteType = QType::Cast($mixValue, 'QControl'));
					case 'NoteAttrControl':
						return ($this->txtNoteAttr = QType::Cast($mixValue, 'QControl'));
					case 'TimeTrackingControl':
						return ($this->txtTimeTracking = QType::Cast($mixValue, 'QControl'));
					case 'LastModifiedControl':
						return ($this->txtLastModified = QType::Cast($mixValue, 'QControl'));
					case 'DateSubmittedControl':
						return ($this->txtDateSubmitted = QType::Cast($mixValue, 'QControl'));
					default:
						return parent::__set($strName, $mixValue);
				}
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}
	}
?>